<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>首页</title>
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_1566355_d9invjgxptk.css">
    <!-- <link rel="stylesheet" href="http://at.alicdn.com/t/font_1566550_fl55xfspegu.css"> -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.2/lib/index.css">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <link rel="stylesheet" href="css/index.css">
    <style>

    </style>
</head>

<body>
    <div class="container">
        <!--头部搜索-->
        <div class="top-header">
            <div class="header-left">
                <input type="text" placeholder="输入菜品名称"></input>
                <a href="login.html">
                    <span class="iconfont icon-ring"></span>
                </a>
            </div>
        </div>
        <!--轮播图-->
        <div class="swipe">
            <van-swipe :autoplay="3000" indicator-color="white">
                <van-swipe-item>
                    <img src="image/swipe1.jpg" alt>
                </van-swipe-item>
                <van-swipe-item>
                    <img src="image/swipe2.jpg" alt>
                </van-swipe-item>
                <van-swipe-item>
                    <img src="image/swipe3.jpg" alt>
                </van-swipe-item>
                <van-swipe-item>
                    <img src="image/swipe4.jpg" alt>
                </van-swipe-item>
            </van-swipe>
        </div>
        <!--今日新品-->
        <div class="goodsList">
            <div class="mini-title">
                <h2>今日新品</h2>
                <span class="iconfont icon-more">
                    <a>
                    </a>
                </span>
            </div>
            <ul>
                <template v-for="good in goodsList">
                    <li v-if="good.SaleAmount>0">
                        <a>
                            <img v-bind:src="good.GoodsImage" alt="">
                            <div class="iconfont icon-play">
                            </div>
                        </a>
                        <p>{{good.Title}}</p>
                        <!-- <p><span class="newPrice">￥{{good.SaleAmount}}</span><del
                                class="oldPrice">￥{{good.SaleAmount}}</del></p> -->
                    </li>
                </template>
            </ul>
        </div>
        <!--吃货种草机-->
        <div class="goodsList1">
            <div class="second-title">
                <h2>吃货种草机</h2>
                <span class="iconfont icon-more">
                    <a href="http://www.baidu.com">
                    </a>
                </span>
            </div>
            <ul>
                <template v-for="good in goodsList1">
                    <li v-if="good.SaleAmount>0">
                        <img v-bind:src="good.GoodsImage" alt="">
                        <!-- <p>{{good.Title}}</p>
                        <p><span class="newPrice">￥{{good.SaleAmount}}</span><del
                                class="oldPrice">￥{{good.SaleAmount}}</del></p> -->
                    </li>
                </template>
            </ul>
        </div>
        <!--四个小块-->
        <div class="four">
            <ul>
                <li>
                    <a>
                        <div class="p2-1">
                            <img src="image/cake.jpg">
                        </div>
                    </a>
                </li>
                <li>
                    <a>
                        <div class="p2-1">
                            <img src="image/chicken.jpg">
                        </div>
                    </a>
                </li>
                <li>
                    <a>
                        <div class="p2-1">
                            <img src="image/milky tea.jpg">
                        </div>
                    </a>
                </li>
                <li><a>
                        <div class="p2-1">
                            <img src="image/steak.jpg">
                        </div>
                    </a>
                </li>
            </ul>
        </div>
        <!--美食研究所-->
        <div class="yj">
            <div class="third-title">
                <h2>美食研究所</h2>
                <span class="iconfont icon-more">
                    <a href="http://www.baidu.com">
                    </a>
                </span>
            </div>
            <div class="bg-frame">
                <div class="bg">
                    <div class="nr">
                        <h2>诚意美食推荐</h2>
                        <p>查看更多美食IP></p>
                    </div>
                    <div class="three">
                        <!-- <div class="aaa"> -->
                        <div class="user1">
                            <img src="image/xgh.png">
                            <p>许光汗</p>
                            <em>厨房男神</em>
                        </div>
                        <div class="user2">
                            <img src="image/jackson.png">
                            <p>易烊千玺</p>
                            <em>厨房男神</em>
                        </div>
                        <div class="user3">
                            <img src="image/pp.png">
                            <p>片寄凉太</p>
                            <em>厨房男神</em>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="announce">
        <img src="./image/logo.png">
    </div>
    <!--底部导航-->
    <div class="tab">
        <ul>
            <li>
                <a href="index.html">
                    <span class="iconfont icon-index"></span>
                    <p>首页</p>
                </a>
            </li>
            <li>
                <a href="sort.html">
                    <span class="iconfont icon-fl"></span>
                    <p>分类</p>
                </a>
            </li>
            <li>
                <a href="shoppingcart.html">
                    <span class="iconfont icon-shop"></span>
                    <p>商城</p>
                </a>
            </li>
            <li>
                <a href="personalcenter.html">
                    <span class="iconfont icon-my"></span>
                    <p>我的</p>
                </a>
            </li>
        </ul>
    </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vant@2.2/lib/vant.min.js"></script>

    <script>
        var app = new Vue({
            el: ".container",
            data: {
                type1select: true,
                type2select: false,
                type3select: false,
                type4select: false,
                goodsList: [
                    {
                        "Id": 26,
                        "ShopId": 2,
                        "GoodsNo": "1333814",
                        "DataStatus": 2,
                        "Title": "虾仁汤",
                        "Classify": 401,
                        "ClassifyName": "猫粮",
                        "GoodsImage": "http://img.szzhangchu.com/1496158377231_3556170905.jpg@334w_334h_1e_1c.jpg",
                        "Stock": 10,
                        "SaleAmount": 350,
                        "CreateDate": "2018-10-27T11:12:22.000Z",
                        "UpdateDate": "2018-11-19T08:05:40.000Z",
                        "Brand": "皇家",
                        "OrderNum": 0
                    },
                    {
                        "Id": 34,
                        "ShopId": 2,
                        "GoodsNo": "2562744",
                        "DataStatus": 2,
                        "Title": "营养面条",
                        "Classify": 402,
                        "ClassifyName": "狗粮",
                        "GoodsImage": "http://img.szzhangchu.com/1496158762753_3223095836.jpg@334w_334h_1e_1c.jpg",
                        "Stock": 10,
                        "SaleAmount": 280,
                        "CreateDate": "2018-11-04T18:13:40.000Z",
                        "UpdateDate": "2018-11-19T08:10:36.000Z",
                        "Brand": "K9",
                        "OrderNum": 0
                    }],
                    goodsList1: [
                    {
                        "Id": 26,
                        "ShopId": 2,
                        "GoodsNo": "1333814",
                        "DataStatus": 2,
                        "Title": "进口|皇家|幼猫奶糕2kg",
                        "Classify": 401,
                        "ClassifyName": "猫粮",
                        "GoodsImage": "image/bg.jpg",
                        "Stock": 10,
                        "SaleAmount": 350,
                        "CreateDate": "2018-10-27T11:12:22.000Z",
                        "UpdateDate": "2018-11-19T08:05:40.000Z",
                        "Brand": "皇家",
                        "OrderNum": 0
                    },
                    {
                        "Id": 34,
                        "ShopId": 2,
                        "GoodsNo": "2562744",
                        "DataStatus": 2,
                        "Title": "进口|K9|鸡肉狗粮500g",
                        "Classify": 402,
                        "ClassifyName": "狗粮",
                        "GoodsImage": "image/hot pot.jpg",
                        "Stock": 10,
                        "SaleAmount": 280,
                        "CreateDate": "2018-11-04T18:13:40.000Z",
                        "UpdateDate": "2018-11-19T08:10:36.000Z",
                        "Brand": "K9",
                        "OrderNum": 0
                    }],
            },
            methods: {
                Select1: function () {
                    this.type1select = true;
                    this.type2select = false;
                    this.type3select = false;
                    this.type4select = false;
                },
                Select2: function () {
                    this.type1select = false;
                    this.type2select = true;
                    this.type3select = false;
                    this.type4select = false;
                },
                Select3: function () {
                    this.type1select = false;
                    this.type2select = false;
                    this.type3select = true;
                    this.type4select = false;
                },
                Select4: function () {
                    this.type1select = false;
                    this.type2select = false;
                    this.type3select = false;
                    this.type4select = true;
                }
            },
        })
    </script>
</body>

</html>